home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch2e < prev    next >
Encoding:
Internet Message Format  |  1989-08-19  |  57.2 KB

  1. Path: uunet!zephyr.ens.tek.com!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v08i010:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch2e
  5. Message-ID: <4462@tekred.CNA.TEK.COM>
  6. Date: 18 Aug 89 15:50:19 GMT
  7. Sender: nobody@tekred.CNA.TEK.COM
  8. Lines: 2209
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 8, Issue 10
  13. Archive-name: NetHack3/Patch2e
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 5 (of 7)."
  25. # Contents:  patch02e
  26. # Wrapped by billr@saab on Fri Aug 18 08:35:58 1989
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'patch02e' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'patch02e'\"
  30. else
  31. echo shar: Extracting \"'patch02e'\" \(54587 characters\)
  32. sed "s/^X//" >'patch02e' <<'END_OF_FILE'
  33. X*** src/Old/mhitu.c    Wed Aug 16 12:26:05 1989
  34. X--- src/mhitu.c    Tue Aug 15 20:34:37 1989
  35. X***************
  36. X*** 20,71 ****
  37. X  static int explmu P((struct monst *,struct attack *));
  38. X  static int gazemu P((struct monst *,struct attack *));
  39. X  
  40. X- #ifdef POLYSELF
  41. X- boolean
  42. X- /* also needed in uhitm.c */
  43. X- #else
  44. X- static boolean
  45. X- #endif
  46. X- incompatible(mon)
  47. X- register struct monst *mon;
  48. X- {
  49. X-     return(poly_gender() != 1-gender(mon));
  50. X- }
  51. X- 
  52. X- boolean
  53. X- is_nymph(mon)
  54. X- register struct monst *mon;
  55. X- {
  56. X-     return( mon->data->mlet == S_NYMPH );
  57. X- }
  58. X  
  59. X- boolean
  60. X- sp_melee(mon)
  61. X- register struct monst *mon;
  62. X- {
  63. X-     return(
  64. X- #ifdef SEDUCE
  65. X-         (mon->data == &mons[PM_SUCCUBUS] && !mon->minvis) ||
  66. X-         (mon->data == &mons[PM_INCUBUS] && !mon->minvis) ||
  67. X- #endif
  68. X-         is_nymph(mon));
  69. X- }
  70. X- 
  71. X  static void
  72. X! hitmsg(mtmp, attyp)
  73. X  register struct monst *mtmp;
  74. X! register uchar attyp;
  75. X  {
  76. X      /* Note: if opposite gender, "seductively" */
  77. X      /* If same gender, "engagingly" for nymph, normal msg for others */
  78. X!     if(sp_melee(mtmp) && !mtmp->mcan && !mtmp->mspec_used) {
  79. X!         if(!is_nymph(mtmp) && incompatible(mtmp)) goto strike;
  80. X              kludge("%s %s you %s.", Monnam(mtmp),
  81. X              Blind ? "talks to" : "smiles at",
  82. X!             incompatible(mtmp) ? "engagingly" : "seductively");
  83. X      } else
  84. X! strike:
  85. X!         switch (attyp) {
  86. X          case AT_BITE:
  87. X              kludge("%s bites!", Monnam(mtmp));
  88. X              break;
  89. X--- 20,42 ----
  90. X  static int explmu P((struct monst *,struct attack *));
  91. X  static int gazemu P((struct monst *,struct attack *));
  92. X  
  93. X  
  94. X  static void
  95. X! hitmsg(mtmp, mattk)
  96. X  register struct monst *mtmp;
  97. X! register struct attack *mattk;
  98. X  {
  99. X+     int compat;
  100. X+ 
  101. X      /* Note: if opposite gender, "seductively" */
  102. X      /* If same gender, "engagingly" for nymph, normal msg for others */
  103. X!     if((compat = could_seduce(mtmp, &youmonst, mattk))
  104. X!             && !mtmp->mcan && !mtmp->mspec_used) {
  105. X              kludge("%s %s you %s.", Monnam(mtmp),
  106. X              Blind ? "talks to" : "smiles at",
  107. X!             compat == 2 ? "engagingly" : "seductively");
  108. X      } else
  109. X!         switch (mattk->aatyp) {
  110. X          case AT_BITE:
  111. X              kludge("%s bites!", Monnam(mtmp));
  112. X              break;
  113. X***************
  114. X*** 91,105 ****
  115. X  }
  116. X  
  117. X  static void
  118. X! missmu(mtmp, nearmiss)        /* monster missed you */
  119. X  register struct monst *mtmp;
  120. X  register boolean nearmiss;
  121. X  {
  122. X!     if(sp_melee(mtmp) && !mtmp->mcan) {
  123. X!         if(!is_nymph(mtmp) && incompatible(mtmp)) goto strike;
  124. X          kludge("%s pretends to be friendly.", Monnam(mtmp));
  125. X!     } else {
  126. X! strike:
  127. X          if (!flags.verbose || !nearmiss)
  128. X          kludge("%s misses.", Monnam(mtmp));
  129. X          else
  130. X--- 62,75 ----
  131. X  }
  132. X  
  133. X  static void
  134. X! missmu(mtmp, nearmiss, mattk)        /* monster missed you */
  135. X  register struct monst *mtmp;
  136. X  register boolean nearmiss;
  137. X+ register struct attack *mattk;
  138. X  {
  139. X!     if(could_seduce(mtmp, &youmonst, mattk) && !mtmp->mcan)
  140. X          kludge("%s pretends to be friendly.", Monnam(mtmp));
  141. X!     else {
  142. X          if (!flags.verbose || !nearmiss)
  143. X          kludge("%s misses.", Monnam(mtmp));
  144. X          else
  145. X***************
  146. X*** 127,141 ****
  147. X  wildmiss(mtmp)        /* monster attacked your displaced image */
  148. X      register struct monst *mtmp;
  149. X  {
  150. X      if (!flags.verbose) return;
  151. X      if (!cansee(mtmp->mx, mtmp->my)) return;
  152. X          /* maybe it's attacking an image around the corner? */
  153. X      if(Invis && !perceives(mtmp->data)) {
  154. X!         if(sp_melee(mtmp) && !mtmp->mcan) {
  155. X!         if(!is_nymph(mtmp) && incompatible(mtmp)) goto strike;
  156. X          kludge("%s tries to touch you and misses!", Monnam(mtmp));
  157. X!         } else
  158. X! strike:
  159. X          switch(rn2(3)) {
  160. X          case 0: kludge("%s swings wildly and misses!", Monnam(mtmp));
  161. X              break;
  162. X--- 97,119 ----
  163. X  wildmiss(mtmp)        /* monster attacked your displaced image */
  164. X      register struct monst *mtmp;
  165. X  {
  166. X+     int compat;
  167. X+ 
  168. X      if (!flags.verbose) return;
  169. X      if (!cansee(mtmp->mx, mtmp->my)) return;
  170. X          /* maybe it's attacking an image around the corner? */
  171. X+ 
  172. X+     compat = could_seduce(mtmp, &youmonst, (struct attack *)0);
  173. X+         /* we really want to have the attack here to pass --
  174. X+          * the previous code checked whether mtmp was a nymph,
  175. X+          * which was not correct either since the attack type of
  176. X+          * succubi/incubi varies with SEDUCE
  177. X+          */
  178. X+ 
  179. X      if(Invis && !perceives(mtmp->data)) {
  180. X!         if(compat)
  181. X          kludge("%s tries to touch you and misses!", Monnam(mtmp));
  182. X!         else
  183. X          switch(rn2(3)) {
  184. X          case 0: kludge("%s swings wildly and misses!", Monnam(mtmp));
  185. X              break;
  186. X***************
  187. X*** 148,161 ****
  188. X          }
  189. X      }
  190. X      else if(Displaced) {
  191. X!         if(sp_melee(mtmp) && !mtmp->mcan) {
  192. X!         if(!is_nymph(mtmp) && incompatible(mtmp)) goto strikem;
  193. X          kludge("%s smiles %s at your %sdisplaced image...",
  194. X              Monnam(mtmp),
  195. X!             incompatible(mtmp) ? "engagingly" : "seductively",
  196. X              Invis ? "invisible " : "");
  197. X!        } else
  198. X! strikem:
  199. X          kludge("%s strikes at your %sdisplaced image and misses you!",
  200. X              /* Note: if you're both invisible and displaced,
  201. X               * only monsters which see invisible will attack your
  202. X--- 126,137 ----
  203. X          }
  204. X      }
  205. X      else if(Displaced) {
  206. X!         if(compat)
  207. X          kludge("%s smiles %s at your %sdisplaced image...",
  208. X              Monnam(mtmp),
  209. X!             compat == 2 ? "engagingly" : "seductively",
  210. X              Invis ? "invisible " : "");
  211. X!        else
  212. X          kludge("%s strikes at your %sdisplaced image and misses you!",
  213. X              /* Note: if you're both invisible and displaced,
  214. X               * only monsters which see invisible will attack your
  215. X***************
  216. X*** 338,343 ****
  217. X--- 314,320 ----
  218. X  
  219. X      for(i = 0; i < NATTK; i++) {
  220. X  
  221. X+         sum[i] = 0;
  222. X          mattk = &(mdat->mattk[i]);
  223. X          switch(mattk->aatyp) {
  224. X          case AT_CLAW:    /* "hand to hand" attacks */
  225. X***************
  226. X*** 347,395 ****
  227. X          case AT_TUCH:
  228. X          case AT_BUTT:
  229. X              if(!range2) {
  230. X!                 if (!foundyou) {
  231. X!                 wildmiss(mtmp);
  232. X!                 sum[i] = 0;
  233. X!                 } else if(tmp > (j = rnd(20+i)))
  234. X  #ifdef POLYSELF
  235. X!                 if (mattk->aatyp == AT_KICK &&
  236. X!                     thick_skinned(uasmon)) sum[i] = 0;
  237. X!                     else
  238. X  #endif
  239. X                      sum[i] = hitmu(mtmp, mattk);
  240. X!                 else {
  241. X!                 missmu(mtmp, (tmp == j));
  242. X!                 sum[i] = 0;
  243. X!                 }
  244. X!             } else    sum[i] = 0;
  245. X              break;
  246. X  
  247. X          case AT_HUGS:    /* automatic if prev two attacks succeed */
  248. X              /* Note: if displaced, prev attacks never succeeded */
  249. X!             if(!range2) {
  250. X!                 if(sum[i-1] && sum[i-2])
  251. X                  sum[i]= hitmu(mtmp, mattk);
  252. X-                 else sum[i] = 0;
  253. X-             } else     sum[i] = 0;
  254. X              break;
  255. X  
  256. X          case AT_GAZE:    /* can affect you either ranged or not */
  257. X!             if (!youseeit) sum[i] = 0;
  258. X!                 /* Displaced and around a corner so not visible */
  259. X!             else sum[i] = gazemu(mtmp, mattk);
  260. X              break;
  261. X  
  262. X          case AT_EXPL:    /* automatic hit if next to, and aimed at you */
  263. X              if(!range2) {
  264. X!                 if (!foundyou) {
  265. X                  if (!mtmp->mcan) {
  266. X                      pline("%s explodes at a spot in thin air!",
  267. X                      youseeit ? Monnam(mtmp) : "It");
  268. X                      mondead(mtmp);
  269. X                      sum[i] = 2;
  270. X!                 } else sum[i] = 0;
  271. X!                 } else    sum[i] = explmu(mtmp, mattk);
  272. X!             } else sum[i] = 0;
  273. X              break;
  274. X  
  275. X          case AT_ENGL:
  276. X--- 324,368 ----
  277. X          case AT_TUCH:
  278. X          case AT_BUTT:
  279. X              if(!range2) {
  280. X!                 if (foundyou) {
  281. X!                 if(tmp > (j = rnd(20+i))) {
  282. X  #ifdef POLYSELF
  283. X!                     if (mattk->aatyp != AT_KICK ||
  284. X!                         !thick_skinned(uasmon))
  285. X  #endif
  286. X                      sum[i] = hitmu(mtmp, mattk);
  287. X!                 } else
  288. X!                     missmu(mtmp, (tmp == j), mattk);
  289. X!                 } else
  290. X!                 wildmiss(mtmp);
  291. X!             }
  292. X              break;
  293. X  
  294. X          case AT_HUGS:    /* automatic if prev two attacks succeed */
  295. X              /* Note: if displaced, prev attacks never succeeded */
  296. X!             if(!range2 && sum[i-1] && sum[i-2])
  297. X                  sum[i]= hitmu(mtmp, mattk);
  298. X              break;
  299. X  
  300. X          case AT_GAZE:    /* can affect you either ranged or not */
  301. X!             if (youseeit)
  302. X!                 /* not displaced around a corner so not visible */
  303. X!                 sum[i] = gazemu(mtmp, mattk);
  304. X              break;
  305. X  
  306. X          case AT_EXPL:    /* automatic hit if next to, and aimed at you */
  307. X              if(!range2) {
  308. X!                 if (foundyou)
  309. X!                 sum[i] = explmu(mtmp, mattk);
  310. X!                 else {
  311. X                  if (!mtmp->mcan) {
  312. X                      pline("%s explodes at a spot in thin air!",
  313. X                      youseeit ? Monnam(mtmp) : "It");
  314. X                      mondead(mtmp);
  315. X                      sum[i] = 2;
  316. X!                 }
  317. X!                 }
  318. X!             }
  319. X              break;
  320. X  
  321. X          case AT_ENGL:
  322. X***************
  323. X*** 402,423 ****
  324. X                      nscr();
  325. X                      sum[i] = gulpmu(mtmp, mattk);
  326. X                  } else {
  327. X!                     missmu(mtmp, (tmp == j));
  328. X!                     sum[i] = 0;
  329. X                  }
  330. X                  } else pline("%s gulps some air!", youseeit ?
  331. X                  Monnam(mtmp) : "It");
  332. X!             } else    sum[i] = 0;
  333. X              break;
  334. X          case AT_BREA:
  335. X              if(range2) sum[i] = breamu(mtmp, mattk);
  336. X              /* Note: breamu takes care of displacement */
  337. X-             else       sum[i] = 0;
  338. X              break;
  339. X          case AT_SPIT:
  340. X              if(range2) sum[i] = spitmu(mtmp);
  341. X              /* Note: spitmu takes care of displacement */
  342. X-             else       sum[i] = 0;
  343. X              break;
  344. X          case AT_WEAP:
  345. X              if(range2) {
  346. X--- 375,393 ----
  347. X                      nscr();
  348. X                      sum[i] = gulpmu(mtmp, mattk);
  349. X                  } else {
  350. X!                     missmu(mtmp, (tmp == j), mattk);
  351. X                  }
  352. X                  } else pline("%s gulps some air!", youseeit ?
  353. X                  Monnam(mtmp) : "It");
  354. X!             }
  355. X              break;
  356. X          case AT_BREA:
  357. X              if(range2) sum[i] = breamu(mtmp, mattk);
  358. X              /* Note: breamu takes care of displacement */
  359. X              break;
  360. X          case AT_SPIT:
  361. X              if(range2) sum[i] = spitmu(mtmp);
  362. X              /* Note: spitmu takes care of displacement */
  363. X              break;
  364. X          case AT_WEAP:
  365. X              if(range2) {
  366. X***************
  367. X*** 425,435 ****
  368. X                  if (dlevel != rogue_level)
  369. X  #endif
  370. X                      sum[i] = thrwmu(mtmp);
  371. X!             } else {
  372. X!                 if (!foundyou) {
  373. X!                 wildmiss(mtmp);
  374. X!                 sum[i] = 0;
  375. X!                 } else {
  376. X                  set_uasmon();
  377. X                  otmp = select_hwep(mtmp);
  378. X                  if(otmp) {
  379. X--- 395,402 ----
  380. X                  if (dlevel != rogue_level)
  381. X  #endif
  382. X                      sum[i] = thrwmu(mtmp);
  383. X!             } else
  384. X!                 if (foundyou) {
  385. X                  set_uasmon();
  386. X                  otmp = select_hwep(mtmp);
  387. X                  if(otmp) {
  388. X***************
  389. X*** 438,456 ****
  390. X                  }
  391. X                  if(tmp > (j = rnd(20+i)))
  392. X                      sum[i] = hitmu(mtmp, mattk);
  393. X!                 else {
  394. X!                     missmu(mtmp, (tmp == j));
  395. X!                     sum[i] = 0;
  396. X!                 }
  397. X!                 }
  398. X!             }
  399. X              break;
  400. X          case AT_MAGC:
  401. X!             if(!range2) {
  402. X!                 if (!foundyou) {
  403. X                  pline("%s casts a spell at thin air!",
  404. X                      youseeit ? Monnam(mtmp) : "It");
  405. X-                 sum[i] = 0;
  406. X                  /* Not totally right since castmu allows other
  407. X                   * spells, such as the monster healing itself,
  408. X                   * that should work even when not next to you--
  409. X--- 405,424 ----
  410. X                  }
  411. X                  if(tmp > (j = rnd(20+i)))
  412. X                      sum[i] = hitmu(mtmp, mattk);
  413. X!                 else
  414. X!                     missmu(mtmp, (tmp == j), mattk);
  415. X!                 } else
  416. X!                 wildmiss(mtmp);
  417. X              break;
  418. X          case AT_MAGC:
  419. X!             if (range2)
  420. X!                 sum[i] = buzzmu(mtmp, mattk);
  421. X!             else
  422. X!                 if (foundyou)
  423. X!                 sum[i] = castmu(mtmp, mattk);
  424. X!                 else
  425. X                  pline("%s casts a spell at thin air!",
  426. X                      youseeit ? Monnam(mtmp) : "It");
  427. X                  /* Not totally right since castmu allows other
  428. X                   * spells, such as the monster healing itself,
  429. X                   * that should work even when not next to you--
  430. X***************
  431. X*** 457,472 ****
  432. X                   * but the previous code was just as wrong.
  433. X                   * --KAA
  434. X                   */
  435. X-                 } else sum[i] = castmu(mtmp, mattk);
  436. X-             } else    sum[i] = buzzmu(mtmp, mattk);
  437. X              break;
  438. X  
  439. X          default:        /* no attack */
  440. X-             sum[i] = 0;
  441. X              break;
  442. X          }
  443. X          if(flags.botl) bot();
  444. X          if(sum[i] == 2)  return(1);      /* attacker dead */
  445. X      }
  446. X      return(0);
  447. X  }
  448. X--- 425,440 ----
  449. X                   * but the previous code was just as wrong.
  450. X                   * --KAA
  451. X                   */
  452. X              break;
  453. X  
  454. X          default:        /* no attack */
  455. X              break;
  456. X          }
  457. X          if(flags.botl) bot();
  458. X          if(sum[i] == 2)  return(1);      /* attacker dead */
  459. X+         if(sum[i] == 3) break;  /* attacker teleported, no more attacks */
  460. X+         /* sum[i] == 1: successful attack */
  461. X+         /* sum[i] == 0: unsuccessful attack */
  462. X      }
  463. X      return(0);
  464. X  }
  465. X***************
  466. X*** 473,479 ****
  467. X  
  468. X  /*
  469. X   * hitmu: monster hits you
  470. X!  *      returns 2 if monster dies (e.g. "yellow light"), 0 otherwise
  471. X   */
  472. X  static
  473. X  int
  474. X--- 441,448 ----
  475. X  
  476. X  /*
  477. X   * hitmu: monster hits you
  478. X!  *      returns 2 if monster dies (e.g. "yellow light"), 1 otherwise
  479. X!  *      3 if the monster lives but teleported, so it can't keep attacking you
  480. X   */
  481. X  static
  482. X  int
  483. X***************
  484. X*** 541,547 ****
  485. X                    "crushed");
  486. X  
  487. X          } else {              /* hand to hand weapon */
  488. X!             hitmsg(mtmp,mattk->aatyp);
  489. X              if(mattk->aatyp == AT_WEAP && otmp) {
  490. X              dmg += dmgval(otmp, uasmon);
  491. X              if (dmg <= 0) dmg = 1;
  492. X--- 510,516 ----
  493. X                    "crushed");
  494. X  
  495. X          } else {              /* hand to hand weapon */
  496. X!             hitmsg(mtmp, mattk);
  497. X              if(mattk->aatyp == AT_WEAP && otmp) {
  498. X              dmg += dmgval(otmp, uasmon);
  499. X              if (dmg <= 0) dmg = 1;
  500. X***************
  501. X*** 551,559 ****
  502. X                          && !resists_drli(uasmon)
  503. X  #  endif
  504. X                                      ) {
  505. X                  pline("The %s blade drains your life!",
  506. X                      Hallucination ? hcolor() : black);
  507. X!                 losexp();
  508. X              }
  509. X  #endif
  510. X  #ifdef POLYSELF
  511. X--- 520,531 ----
  512. X                          && !resists_drli(uasmon)
  513. X  #  endif
  514. X                                      ) {
  515. X+                 if (Blind)
  516. X+                 You("feel an unholy blade drain your life!");
  517. X+                 else
  518. X                  pline("The %s blade drains your life!",
  519. X                      Hallucination ? hcolor() : black);
  520. X!                 losexp();
  521. X              }
  522. X  #endif
  523. X  #ifdef POLYSELF
  524. X***************
  525. X*** 577,589 ****
  526. X          }
  527. X          break;
  528. X          case AD_DISE:
  529. X!         hitmsg(mtmp, mattk->aatyp);
  530. X          You("feel very sick.");
  531. X          make_sick((long)rn1(25-ACURR(A_CON),15),FALSE);
  532. X          u.usick_cause = mdat->mname;
  533. X          break;
  534. X          case AD_FIRE:
  535. X!         hitmsg(mtmp,mattk->aatyp);
  536. X          if(ctmp && rn2(2)) {
  537. X              pline("You're on fire!");
  538. X              if (Fire_resistance) {
  539. X--- 549,561 ----
  540. X          }
  541. X          break;
  542. X          case AD_DISE:
  543. X!         hitmsg(mtmp, mattk);
  544. X          You("feel very sick.");
  545. X          make_sick((long)rn1(25-ACURR(A_CON),15),FALSE);
  546. X          u.usick_cause = mdat->mname;
  547. X          break;
  548. X          case AD_FIRE:
  549. X!         hitmsg(mtmp, mattk);
  550. X          if(ctmp && rn2(2)) {
  551. X              pline("You're on fire!");
  552. X              if (Fire_resistance) {
  553. X***************
  554. X*** 601,607 ****
  555. X          }
  556. X          break;
  557. X          case AD_COLD:
  558. X!         hitmsg(mtmp,mattk->aatyp);
  559. X          if(ctmp && rn2(2)) {
  560. X              pline("You're covered in frost!");
  561. X              if (Cold_resistance) {
  562. X--- 573,579 ----
  563. X          }
  564. X          break;
  565. X          case AD_COLD:
  566. X!         hitmsg(mtmp, mattk);
  567. X          if(ctmp && rn2(2)) {
  568. X              pline("You're covered in frost!");
  569. X              if (Cold_resistance) {
  570. X***************
  571. X*** 613,619 ****
  572. X          }
  573. X          break;
  574. X          case AD_ELEC:
  575. X!         hitmsg(mtmp,mattk->aatyp);
  576. X          if(ctmp && rn2(2)) {
  577. X              You("get zapped!");
  578. X              if (Shock_resistance) {
  579. X--- 585,591 ----
  580. X          }
  581. X          break;
  582. X          case AD_ELEC:
  583. X!         hitmsg(mtmp, mattk);
  584. X          if(ctmp && rn2(2)) {
  585. X              You("get zapped!");
  586. X              if (Shock_resistance) {
  587. X***************
  588. X*** 627,633 ****
  589. X          }
  590. X          break;
  591. X          case AD_SLEE:
  592. X!         hitmsg(mtmp,mattk->aatyp);
  593. X          if(ctmp && multi >= 0 && !rn2(5)) {
  594. X              if (Sleep_resistance) break;
  595. X              nomul(-rnd(10));
  596. X--- 599,605 ----
  597. X          }
  598. X          break;
  599. X          case AD_SLEE:
  600. X!         hitmsg(mtmp, mattk);
  601. X          if(ctmp && multi >= 0 && !rn2(5)) {
  602. X              if (Sleep_resistance) break;
  603. X              nomul(-rnd(10));
  604. X***************
  605. X*** 644,650 ****
  606. X          case AD_DRCO:
  607. X          ptmp = A_CON;
  608. X  dopois:
  609. X!         hitmsg(mtmp,mattk->aatyp);
  610. X          if(ctmp && !rn2(8)) {
  611. X              Sprintf(buf, "%s's %s",
  612. X                  Hallucination ? rndmonnam() : mdat->mname,
  613. X--- 616,622 ----
  614. X          case AD_DRCO:
  615. X          ptmp = A_CON;
  616. X  dopois:
  617. X!         hitmsg(mtmp, mattk);
  618. X          if(ctmp && !rn2(8)) {
  619. X              Sprintf(buf, "%s's %s",
  620. X                  Hallucination ? rndmonnam() : mdat->mname,
  621. X***************
  622. X*** 653,659 ****
  623. X          }
  624. X          break;
  625. X          case AD_PLYS:
  626. X!         hitmsg(mtmp, mattk->aatyp);
  627. X          if(ctmp && multi >= 0 && !rn2(3)) {
  628. X              if (Blind)    You("are frozen!");
  629. X              else    You("are frozen by %s!", mon_nam(mtmp));
  630. X--- 625,631 ----
  631. X          }
  632. X          break;
  633. X          case AD_PLYS:
  634. X!         hitmsg(mtmp, mattk);
  635. X          if(ctmp && multi >= 0 && !rn2(3)) {
  636. X              if (Blind)    You("are frozen!");
  637. X              else    You("are frozen by %s!", mon_nam(mtmp));
  638. X***************
  639. X*** 661,667 ****
  640. X          }
  641. X          break;
  642. X          case AD_DRLI:
  643. X!         hitmsg(mtmp, mattk->aatyp);
  644. X          if (ctmp && !rn2(3)
  645. X  #ifdef POLYSELF
  646. X              && !resists_drli(uasmon)
  647. X--- 633,639 ----
  648. X          }
  649. X          break;
  650. X          case AD_DRLI:
  651. X!         hitmsg(mtmp, mattk);
  652. X          if (ctmp && !rn2(3)
  653. X  #ifdef POLYSELF
  654. X              && !resists_drli(uasmon)
  655. X***************
  656. X*** 674,689 ****
  657. X          case AD_LEGS:
  658. X          { register long side = rn2(2) ? RIGHT_SIDE : LEFT_SIDE;
  659. X            if (mtmp->mcan) {
  660. X!             pline("%s nuzzles against your %s %s!", Monnam(mtmp),
  661. X                (side == RIGHT_SIDE) ? "right" : "left",
  662. X                body_part(LEG));
  663. X            } else {
  664. X              if (uarmf) {
  665. X!             pline("%s scratches your %s boot!", Monnam(mtmp),
  666. X                  (side == RIGHT_SIDE) ? "right" : "left");
  667. X              break;
  668. X              }
  669. X!             pline("%s pricks your %s %s!", Monnam(mtmp),
  670. X                (side == RIGHT_SIDE) ? "right" : "left",
  671. X                body_part(LEG));
  672. X              set_wounded_legs(side, rnd(60-ACURR(A_DEX)));
  673. X--- 646,661 ----
  674. X          case AD_LEGS:
  675. X          { register long side = rn2(2) ? RIGHT_SIDE : LEFT_SIDE;
  676. X            if (mtmp->mcan) {
  677. X!             kludge("%s nuzzles against your %s %s!", Monnam(mtmp),
  678. X                (side == RIGHT_SIDE) ? "right" : "left",
  679. X                body_part(LEG));
  680. X            } else {
  681. X              if (uarmf) {
  682. X!             kludge("%s scratches your %s boot!", Monnam(mtmp),
  683. X                  (side == RIGHT_SIDE) ? "right" : "left");
  684. X              break;
  685. X              }
  686. X!             kludge("%s pricks your %s %s!", Monnam(mtmp),
  687. X                (side == RIGHT_SIDE) ? "right" : "left",
  688. X                body_part(LEG));
  689. X              set_wounded_legs(side, rnd(60-ACURR(A_DEX)));
  690. X***************
  691. X*** 691,704 ****
  692. X            break;
  693. X          }
  694. X          case AD_STON:    /* at present only a cockatrice */
  695. X!         hitmsg(mtmp,mattk->aatyp);
  696. X          if(!rn2(3) && !Stoned) {
  697. X              if (mtmp->mcan) {
  698. X              if (flags.soundok)
  699. X!                 You("hear a cough from %s!", mon_nam(mtmp));
  700. X              } else {
  701. X              if (flags.soundok)
  702. X!                 You("hear %s's hissing!", mon_nam(mtmp));
  703. X              if((!rn2(10) ||
  704. X                  (flags.moonphase == NEW_MOON &&
  705. X                   !carrying(DEAD_LIZARD)))
  706. X--- 663,678 ----
  707. X            break;
  708. X          }
  709. X          case AD_STON:    /* at present only a cockatrice */
  710. X!         hitmsg(mtmp, mattk);
  711. X          if(!rn2(3) && !Stoned) {
  712. X              if (mtmp->mcan) {
  713. X              if (flags.soundok)
  714. X!                 You("hear a cough from %s!", Blind ? "it"
  715. X!                 : mon_nam(mtmp));
  716. X              } else {
  717. X              if (flags.soundok)
  718. X!                 if (Blind) You("hear its hissing!");
  719. X!                 else You("hear %s's hissing!", mon_nam(mtmp));
  720. X              if((!rn2(10) ||
  721. X                  (flags.moonphase == NEW_MOON &&
  722. X                   !carrying(DEAD_LIZARD)))
  723. X***************
  724. X*** 715,721 ****
  725. X          }
  726. X          break;
  727. X          case AD_STCK:
  728. X!         hitmsg(mtmp,mattk->aatyp);
  729. X          if(ctmp && !u.ustuck
  730. X  #ifdef POLYSELF
  731. X                       && !sticks(uasmon)
  732. X--- 689,695 ----
  733. X          }
  734. X          break;
  735. X          case AD_STCK:
  736. X!         hitmsg(mtmp, mattk);
  737. X          if(ctmp && !u.ustuck
  738. X  #ifdef POLYSELF
  739. X                       && !sticks(uasmon)
  740. X***************
  741. X*** 729,736 ****
  742. X  #endif
  743. X                        ) {
  744. X              if(!u.ustuck && !rn2(10)) {
  745. X!             pline("%s swings itself around you!",
  746. X!                 Monnam(mtmp));
  747. X              u.ustuck = mtmp;
  748. X              } else if(u.ustuck == mtmp) {
  749. X              if (is_pool(mtmp->mx,mtmp->my)
  750. X--- 703,709 ----
  751. X  #endif
  752. X                        ) {
  753. X              if(!u.ustuck && !rn2(10)) {
  754. X!             kludge("%s swings itself around you!", Monnam(mtmp));
  755. X              u.ustuck = mtmp;
  756. X              } else if(u.ustuck == mtmp) {
  757. X              if (is_pool(mtmp->mx,mtmp->my)
  758. X***************
  759. X*** 738,745 ****
  760. X                  && !is_swimmer(uasmon)
  761. X  #endif
  762. X                 ) {
  763. X!                 pline("%s drowns you...", Monnam(mtmp));
  764. X!                 done("drowned");
  765. X              } else if(mattk->aatyp == AT_HUGS)
  766. X                  You("are being crushed.");
  767. X              } else dmg = 0;
  768. X--- 711,718 ----
  769. X                  && !is_swimmer(uasmon)
  770. X  #endif
  771. X                 ) {
  772. X!                 kludge("%s drowns you...", Monnam(mtmp));
  773. X!                 done(DROWNING);
  774. X              } else if(mattk->aatyp == AT_HUGS)
  775. X                  You("are being crushed.");
  776. X              } else dmg = 0;
  777. X***************
  778. X*** 746,752 ****
  779. X          } else dmg = 0;
  780. X          break;
  781. X          case AD_WERE:
  782. X!         hitmsg(mtmp,mattk->aatyp);
  783. X  #ifdef POLYSELF
  784. X          if (ctmp && !rn2(4) && u.ulycn == -1
  785. X  # ifdef NAMED_ITEMS
  786. X--- 719,725 ----
  787. X          } else dmg = 0;
  788. X          break;
  789. X          case AD_WERE:
  790. X!         hitmsg(mtmp, mattk);
  791. X  #ifdef POLYSELF
  792. X          if (ctmp && !rn2(4) && u.ulycn == -1
  793. X  # ifdef NAMED_ITEMS
  794. X***************
  795. X*** 759,765 ****
  796. X  #endif
  797. X          break;
  798. X          case AD_SGLD:
  799. X!         hitmsg(mtmp,mattk->aatyp);
  800. X  #ifdef POLYSELF
  801. X          if (u.usym == mdat->mlet) break;
  802. X  #endif
  803. X--- 732,738 ----
  804. X  #endif
  805. X          break;
  806. X          case AD_SGLD:
  807. X!         hitmsg(mtmp, mattk);
  808. X  #ifdef POLYSELF
  809. X          if (u.usym == mdat->mlet) break;
  810. X  #endif
  811. X***************
  812. X*** 775,786 ****
  813. X  #  endif
  814. X                          ) {
  815. X              if (mtmp->minvent)
  816. X!     pline("%s brags about the goods some dungeon explorer provided.",
  817. X      Monnam(mtmp));
  818. X              else
  819. X!     pline("%s makes some remarks about how difficult theft is lately.",
  820. X      Monnam(mtmp));
  821. X              rloc(mtmp);
  822. X          } else
  823. X  #endif
  824. X          if(mtmp->mcan) {
  825. X--- 748,760 ----
  826. X  #  endif
  827. X                          ) {
  828. X              if (mtmp->minvent)
  829. X!     kludge("%s brags about the goods some dungeon explorer provided.",
  830. X      Monnam(mtmp));
  831. X              else
  832. X!     kludge("%s makes some remarks about how difficult theft is lately.",
  833. X      Monnam(mtmp));
  834. X              rloc(mtmp);
  835. X+             return 3;
  836. X          } else
  837. X  #endif
  838. X          if(mtmp->mcan) {
  839. X***************
  840. X*** 790,808 ****
  841. X                  flags.female ? "charm" : "seduce",
  842. X                  flags.female ? "unaffected" : "uninterested");
  843. X              }
  844. X!             if(rn2(3)) rloc(mtmp);
  845. X          } else if(steal(mtmp)) {
  846. X              rloc(mtmp);
  847. X              mtmp->mflee = 1;
  848. X          }
  849. X          break;
  850. X  #ifdef SEDUCE
  851. X          case AD_SSEX:
  852. X!         if(!mtmp->mcan && !mtmp->minvis) doseduce(mtmp);
  853. X          break;
  854. X  #endif
  855. X          case AD_SAMU:
  856. X!         hitmsg(mtmp,mattk->aatyp);
  857. X          /* when the Wiz hits, 1/20 steals the amulet */
  858. X          if (!carrying(AMULET_OF_YENDOR)) break;
  859. X          if (!rn2(20)) stealamulet(mtmp);
  860. X--- 764,789 ----
  861. X                  flags.female ? "charm" : "seduce",
  862. X                  flags.female ? "unaffected" : "uninterested");
  863. X              }
  864. X!             if(rn2(3)) {
  865. X!             rloc(mtmp);
  866. X!             return 3;
  867. X!             }
  868. X          } else if(steal(mtmp)) {
  869. X              rloc(mtmp);
  870. X              mtmp->mflee = 1;
  871. X+             return 3;
  872. X          }
  873. X          break;
  874. X  #ifdef SEDUCE
  875. X          case AD_SSEX:
  876. X!         if(could_seduce(mtmp, &youmonst, mattk) == 1
  877. X!             && !mtmp->mcan)
  878. X!             if (doseduce(mtmp))
  879. X!             return 3;
  880. X          break;
  881. X  #endif
  882. X          case AD_SAMU:
  883. X!         hitmsg(mtmp, mattk);
  884. X          /* when the Wiz hits, 1/20 steals the amulet */
  885. X          if (!carrying(AMULET_OF_YENDOR)) break;
  886. X          if (!rn2(20)) stealamulet(mtmp);
  887. X***************
  888. X*** 809,815 ****
  889. X          break;
  890. X  
  891. X          case AD_TLPT:
  892. X!         hitmsg(mtmp,mattk->aatyp);
  893. X          if(ctmp) {
  894. X              if(flags.verbose)
  895. X              Your("position suddenly seems very uncertain!");
  896. X--- 790,796 ----
  897. X          break;
  898. X  
  899. X          case AD_TLPT:
  900. X!         hitmsg(mtmp, mattk);
  901. X          if(ctmp) {
  902. X              if(flags.verbose)
  903. X              Your("position suddenly seems very uncertain!");
  904. X***************
  905. X*** 817,823 ****
  906. X          }
  907. X          break;
  908. X          case AD_RUST:
  909. X!         hitmsg(mtmp,mattk->aatyp);
  910. X          if (mtmp->mcan) break;
  911. X  #ifdef POLYSELF
  912. X  #ifdef GOLEMS
  913. X--- 798,804 ----
  914. X          }
  915. X          break;
  916. X          case AD_RUST:
  917. X!         hitmsg(mtmp, mattk);
  918. X          if (mtmp->mcan) break;
  919. X  #ifdef POLYSELF
  920. X  #ifdef GOLEMS
  921. X***************
  922. X*** 868,874 ****
  923. X          }
  924. X          break;
  925. X          case AD_DCAY:
  926. X!         hitmsg(mtmp,mattk->aatyp);
  927. X          if (mtmp->mcan) break;
  928. X  #ifdef POLYSELF
  929. X  #ifdef GOLEMS
  930. X--- 849,855 ----
  931. X          }
  932. X          break;
  933. X          case AD_DCAY:
  934. X!         hitmsg(mtmp, mattk);
  935. X          if (mtmp->mcan) break;
  936. X  #ifdef POLYSELF
  937. X  #ifdef GOLEMS
  938. X***************
  939. X*** 888,894 ****
  940. X              break;
  941. X              case 1:
  942. X              if (uarmc) break;
  943. X!             (void)rust_dmg(uarm, "leather armor", 2, TRUE);
  944. X              break;
  945. X              case 2:
  946. X              if (!rust_dmg(uarms, "wooden shield", 2, FALSE))
  947. X--- 869,875 ----
  948. X              break;
  949. X              case 1:
  950. X              if (uarmc) break;
  951. X!             if (uarm) (void)rust_dmg(uarm, xname(uarm), 2, TRUE);
  952. X              break;
  953. X              case 2:
  954. X              if (!rust_dmg(uarms, "wooden shield", 2, FALSE))
  955. X***************
  956. X*** 934,943 ****
  957. X                  if (flags.soundok && !(moves % 5))
  958. X                  pline("'Doc, I can't help you unless you cooperate.'");
  959. X                  dmg = 0;
  960. X!             } else hitmsg(mtmp,mattk->aatyp);
  961. X          break;
  962. X          case AD_CURS:
  963. X!         hitmsg(mtmp,mattk->aatyp);
  964. X          if(!night() && mdat == &mons[PM_GREMLIN]) break;
  965. X          if(!mtmp->mcan && !rn2(10)) {
  966. X              if (flags.soundok)
  967. X--- 915,924 ----
  968. X                  if (flags.soundok && !(moves % 5))
  969. X                  pline("'Doc, I can't help you unless you cooperate.'");
  970. X                  dmg = 0;
  971. X!             } else hitmsg(mtmp, mattk);
  972. X          break;
  973. X          case AD_CURS:
  974. X!         hitmsg(mtmp, mattk);
  975. X          if(!night() && mdat == &mons[PM_GREMLIN]) break;
  976. X          if(!mtmp->mcan && !rn2(10)) {
  977. X              if (flags.soundok)
  978. X***************
  979. X*** 956,962 ****
  980. X          }
  981. X          break;
  982. X          case AD_STUN:
  983. X!         hitmsg(mtmp,mattk->aatyp);
  984. X          if(!mtmp->mcan && !rn2(4)) {
  985. X              make_stunned(HStun + dmg, TRUE);
  986. X              dmg /= 2;
  987. X--- 937,943 ----
  988. X          }
  989. X          break;
  990. X          case AD_STUN:
  991. X!         hitmsg(mtmp, mattk);
  992. X          if(!mtmp->mcan && !rn2(4)) {
  993. X              make_stunned(HStun + dmg, TRUE);
  994. X              dmg /= 2;
  995. X***************
  996. X*** 963,969 ****
  997. X          }
  998. X          break;
  999. X          case AD_ACID:
  1000. X!         hitmsg(mtmp,mattk->aatyp);
  1001. X          if(!mtmp->mcan && !rn2(3))
  1002. X  #ifdef POLYSELF
  1003. X              if (resists_acid(uasmon)) {
  1004. X--- 944,950 ----
  1005. X          }
  1006. X          break;
  1007. X          case AD_ACID:
  1008. X!         hitmsg(mtmp, mattk);
  1009. X          if(!mtmp->mcan && !rn2(3))
  1010. X  #ifdef POLYSELF
  1011. X              if (resists_acid(uasmon)) {
  1012. X***************
  1013. X*** 975,981 ****
  1014. X          else        dmg = 0;
  1015. X          break;
  1016. X          case AD_SLOW:
  1017. X!         hitmsg(mtmp,mattk->aatyp);
  1018. X          if(!ctmp && (Fast & (INTRINSIC|TIMEOUT)) && !rn2(4)) {
  1019. X              Fast &= ~(INTRINSIC|TIMEOUT);
  1020. X              You("feel yourself slowing down.");
  1021. X--- 956,962 ----
  1022. X          else        dmg = 0;
  1023. X          break;
  1024. X          case AD_SLOW:
  1025. X!         hitmsg(mtmp, mattk);
  1026. X          if(!ctmp && (Fast & (INTRINSIC|TIMEOUT)) && !rn2(4)) {
  1027. X              Fast &= ~(INTRINSIC|TIMEOUT);
  1028. X              You("feel yourself slowing down.");
  1029. X***************
  1030. X*** 982,988 ****
  1031. X          }
  1032. X          break;
  1033. X          case AD_DREN:
  1034. X!         hitmsg(mtmp,mattk->aatyp);
  1035. X  #ifdef SPELLS
  1036. X          if(!ctmp && !rn2(4)) drain_en(dmg);
  1037. X  #endif
  1038. X--- 963,969 ----
  1039. X          }
  1040. X          break;
  1041. X          case AD_DREN:
  1042. X!         hitmsg(mtmp, mattk);
  1043. X  #ifdef SPELLS
  1044. X          if(!ctmp && !rn2(4)) drain_en(dmg);
  1045. X  #endif
  1046. X***************
  1047. X*** 994,1000 ****
  1048. X          break;
  1049. X  #ifdef HARD /* a non-gaze AD_CONF exists only for one of the demons */
  1050. X          case AD_CONF:
  1051. X!         hitmsg(mtmp,mattk->aatyp);
  1052. X          if(!mtmp->mcan && !rn2(4) && !mtmp->mspec_used) {
  1053. X              mtmp->mspec_used += (dmg + rn2(6));
  1054. X              if(Confusion)
  1055. X--- 975,981 ----
  1056. X          break;
  1057. X  #ifdef HARD /* a non-gaze AD_CONF exists only for one of the demons */
  1058. X          case AD_CONF:
  1059. X!         hitmsg(mtmp, mattk);
  1060. X          if(!mtmp->mcan && !rn2(4) && !mtmp->mspec_used) {
  1061. X              mtmp->mspec_used += (dmg + rn2(6));
  1062. X              if(Confusion)
  1063. X***************
  1064. X*** 1252,1258 ****
  1065. X  #endif
  1066. X              You("turn to stone...");
  1067. X              killer = mons[PM_MEDUSA].mname;
  1068. X!             done("stoned");
  1069. X              }
  1070. X          break;
  1071. X  #endif
  1072. X--- 1233,1239 ----
  1073. X  #endif
  1074. X              You("turn to stone...");
  1075. X              killer = mons[PM_MEDUSA].mname;
  1076. X!             done(STONING);
  1077. X              }
  1078. X          break;
  1079. X  #endif
  1080. X***************
  1081. X*** 1269,1274 ****
  1082. X--- 1250,1267 ----
  1083. X              make_confused(HConfusion + conf, FALSE);
  1084. X          }
  1085. X          break;
  1086. X+ #ifdef HARD
  1087. X+         case AD_STUN:
  1088. X+         if(!mtmp->mcan && canseemon(mtmp) && mtmp->mcansee &&
  1089. X+                     !mtmp->mspec_used && rn2(5)) {
  1090. X+             int stun = d(2,6);
  1091. X+ 
  1092. X+             pline("%s stares piercingly at you!", Monnam(mtmp));
  1093. X+             mtmp->mspec_used += (stun + rn2(6));
  1094. X+             make_stunned(HStun + stun, TRUE);
  1095. X+         }
  1096. X+         break;
  1097. X+ #endif
  1098. X          default: impossible("Gaze attack %d?", mattk->adtyp);
  1099. X          break;
  1100. X      }
  1101. X***************
  1102. X*** 1323,1330 ****
  1103. X  }
  1104. X  #endif
  1105. X  
  1106. X  #ifdef SEDUCE
  1107. X! void
  1108. X  doseduce(mon)
  1109. X  register struct monst *mon;
  1110. X  {
  1111. X--- 1316,1379 ----
  1112. X  }
  1113. X  #endif
  1114. X  
  1115. X+ int
  1116. X+ could_seduce(magr,mdef,mattk)
  1117. X+ struct monst *magr, *mdef;
  1118. X+ struct attack *mattk;
  1119. X+ /* returns 0 if seduction impossible,
  1120. X+  *       1 if fine,
  1121. X+  *       2 if wrong gender for nymph */
  1122. X+ {
  1123. X+     register struct permonst *pagr, *pdef;
  1124. X+     boolean agrinvis, defperc;
  1125. X+     xchar genagr, gendef;
  1126. X+ 
  1127. X+     if(magr == &youmonst) {
  1128. X+         pagr = uasmon;
  1129. X+         agrinvis = (Invis != 0);
  1130. X+         genagr = poly_gender();
  1131. X+     } else {
  1132. X+         pagr = magr->data;
  1133. X+         agrinvis = magr->minvis;
  1134. X+         genagr = gender(magr);
  1135. X+     }
  1136. X+     if(mdef == &youmonst) {
  1137. X+         pdef = uasmon;
  1138. X+         defperc = (See_invisible != 0);
  1139. X+         gendef = poly_gender();
  1140. X+     } else {
  1141. X+         pdef = mdef->data;
  1142. X+         defperc = perceives(pdef);
  1143. X+         gendef = gender(mdef);
  1144. X+     }
  1145. X+ 
  1146. X+     if(agrinvis && !defperc
  1147. X+ #ifdef SEDUCE
  1148. X+         && mattk && mattk->adtyp != AD_SSEX
  1149. X+ #endif
  1150. X+         )
  1151. X+         return 0;
  1152. X+ 
  1153. X+     if(pagr->mlet != S_NYMPH
  1154. X+ #ifdef HARD
  1155. X+         && ((pagr != &mons[PM_INCUBUS] && pagr != &mons[PM_SUCCUBUS])
  1156. X+ # ifdef SEDUCE
  1157. X+             || (mattk && mattk->adtyp != AD_SSEX)
  1158. X+ # endif
  1159. X+            )
  1160. X+ #endif
  1161. X+         )
  1162. X+         return 0;
  1163. X+     
  1164. X+     if(genagr == 1 - gendef)
  1165. X+         return 1;
  1166. X+     else
  1167. X+         return (pagr->mlet == S_NYMPH) ? 2 : 0;
  1168. X+ }
  1169. X+ 
  1170. X  #ifdef SEDUCE
  1171. X! /* Returns 1 if monster teleported */
  1172. X! int
  1173. X  doseduce(mon)
  1174. X  register struct monst *mon;
  1175. X  {
  1176. X***************
  1177. X*** 1331,1350 ****
  1178. X      register struct obj *ring;
  1179. X      boolean fem = (mon->data == &mons[PM_SUCCUBUS]); /* otherwise incubus */
  1180. X  
  1181. X-     if (fem == poly_gender() || poly_gender()==2) return;
  1182. X- 
  1183. X      if (mon->mcan || mon->mspec_used) {
  1184. X            pline("%s acts as though %s has got a %sheadache.",
  1185. X                Blind ? "It" : Monnam(mon), Blind ? "it" :
  1186. X                fem ? "she" : "he",
  1187. X              mon->mcan ? "severe " : "");
  1188. X!         return;
  1189. X      }
  1190. X  
  1191. X      if (unconscious()) {
  1192. X          kludge("%s seems dismayed at your lack of response.",
  1193. X              Monnam(mon));
  1194. X!         return;
  1195. X      }
  1196. X  
  1197. X      if (Blind) pline("It caresses you...");
  1198. X--- 1380,1397 ----
  1199. X      register struct obj *ring;
  1200. X      boolean fem = (mon->data == &mons[PM_SUCCUBUS]); /* otherwise incubus */
  1201. X  
  1202. X      if (mon->mcan || mon->mspec_used) {
  1203. X            pline("%s acts as though %s has got a %sheadache.",
  1204. X                Blind ? "It" : Monnam(mon), Blind ? "it" :
  1205. X                fem ? "she" : "he",
  1206. X              mon->mcan ? "severe " : "");
  1207. X!         return 0;
  1208. X      }
  1209. X  
  1210. X      if (unconscious()) {
  1211. X          kludge("%s seems dismayed at your lack of response.",
  1212. X              Monnam(mon));
  1213. X!         return 0;
  1214. X      }
  1215. X  
  1216. X      if (Blind) pline("It caresses you...");
  1217. X***************
  1218. X*** 1360,1366 ****
  1219. X              if (yn() == 'n') continue;
  1220. X          } else pline("%s decides she'd like your %s, and takes it.",
  1221. X              Blind ? "She" : Monnam(mon), xname(ring));
  1222. X!         if (ring->known) makeknown(RIN_ADORNMENT);
  1223. X          if (ring==uleft || ring==uright) Ring_gone(ring);
  1224. X          if (ring==uwep) setuwep((struct obj *)0);
  1225. X          freeinv(ring);
  1226. X--- 1407,1413 ----
  1227. X              if (yn() == 'n') continue;
  1228. X          } else pline("%s decides she'd like your %s, and takes it.",
  1229. X              Blind ? "She" : Monnam(mon), xname(ring));
  1230. X!         makeknown(RIN_ADORNMENT);
  1231. X          if (ring==uleft || ring==uright) Ring_gone(ring);
  1232. X          if (ring==uwep) setuwep((struct obj *)0);
  1233. X          freeinv(ring);
  1234. X***************
  1235. X*** 1426,1432 ****
  1236. X          pline("\"You're such a %s; I wish...\"",
  1237. X                  flags.female ? "sweet lady" : "nice guy");
  1238. X          rloc(mon);
  1239. X!         return;
  1240. X      }
  1241. X  #define ALIGNLIM     (5L + (moves/200L)) /* from pray.c */
  1242. X      if (u.ualigntyp == U_CHAOTIC && u.ualign < ALIGNLIM) u.ualign++;
  1243. X--- 1473,1479 ----
  1244. X          pline("\"You're such a %s; I wish...\"",
  1245. X                  flags.female ? "sweet lady" : "nice guy");
  1246. X          rloc(mon);
  1247. X!         return 1;
  1248. X      }
  1249. X  #define ALIGNLIM     (5L + (moves/200L)) /* from pray.c */
  1250. X      if (u.ualigntyp == U_CHAOTIC && u.ualign < ALIGNLIM) u.ualign++;
  1251. X***************
  1252. X*** 1464,1469 ****
  1253. X--- 1511,1520 ----
  1254. X  #endif
  1255. X                      You("feel out of shape.");
  1256. X                      losexp();
  1257. X+                     if(u.uhp <= 0) {
  1258. X+                     killer = "overexertion";
  1259. X+                     done(DIED);
  1260. X+                     }
  1261. X  #ifdef POLYSELF
  1262. X                  }
  1263. X  #endif
  1264. X***************
  1265. X*** 1534,1539 ****
  1266. X--- 1585,1591 ----
  1267. X      }
  1268. X      if (!rn2(25)) mon->mcan = 1; /* monster is worn out */
  1269. X      rloc(mon);
  1270. X+     return 1;
  1271. X  }
  1272. X  
  1273. X  static void
  1274. X*** src/Old/mklev.c    Wed Aug 16 12:27:26 1989
  1275. X--- src/mklev.c    Tue Aug 15 18:48:20 1989
  1276. X***************
  1277. X*** 14,19 ****
  1278. X--- 14,20 ----
  1279. X  #ifdef ALTARS
  1280. X  static void mkaltar();
  1281. X  #endif
  1282. X+ static boolean occupied();
  1283. X  
  1284. X  int
  1285. X  somex(croom)
  1286. X***************
  1287. X*** 501,507 ****
  1288. X          if(!rn2(3)) {      /* is it a locked door, closed, or a doorway? */
  1289. X          if(!rn2(5))
  1290. X              levl[x][y].doormask = D_ISOPEN;
  1291. X!         else if(!rn2(4))
  1292. X              levl[x][y].doormask = D_LOCKED;
  1293. X          else
  1294. X              levl[x][y].doormask = D_CLOSED;
  1295. X--- 502,508 ----
  1296. X          if(!rn2(3)) {      /* is it a locked door, closed, or a doorway? */
  1297. X          if(!rn2(5))
  1298. X              levl[x][y].doormask = D_ISOPEN;
  1299. X!         else if(!rn2(6))
  1300. X              levl[x][y].doormask = D_LOCKED;
  1301. X          else
  1302. X              levl[x][y].doormask = D_CLOSED;
  1303. X***************
  1304. X*** 798,805 ****
  1305. X          croom = &rooms[rn2(nroom-1)];
  1306. X          if(croom >= troom) croom++;
  1307. X      }
  1308. X!     xupstair = somex(croom);    /* %% < and > might be in the same place */
  1309. X!     yupstair = somey(croom);
  1310. X      levl[xupstair][yupstair].scrsym = UP_SYM;
  1311. X      levl[xupstair][yupstair].typ = STAIRS;
  1312. X  #ifdef STRONGHOLD
  1313. X--- 799,808 ----
  1314. X          croom = &rooms[rn2(nroom-1)];
  1315. X          if(croom >= troom) croom++;
  1316. X      }
  1317. X!     do {
  1318. X!         xupstair = somex(croom);
  1319. X!         yupstair = somey(croom);
  1320. X!     } while(occupied(xupstair, yupstair));
  1321. X      levl[xupstair][yupstair].scrsym = UP_SYM;
  1322. X      levl[xupstair][yupstair].typ = STAIRS;
  1323. X  #ifdef STRONGHOLD
  1324. X***************
  1325. X*** 1025,1030 ****
  1326. X--- 1028,1034 ----
  1327. X  #ifdef ALTARS
  1328. X          || levl[x][y].typ == ALTAR
  1329. X  #endif
  1330. X+         || is_pool(x,y)
  1331. X          );
  1332. X  }
  1333. X  
  1334. X*** src/Old/mkmaze.c    Wed Aug 16 12:28:20 1989
  1335. X--- src/mkmaze.c    Tue Aug 15 20:34:39 1989
  1336. X***************
  1337. X*** 164,169 ****
  1338. X--- 164,174 ----
  1339. X      return;
  1340. X  }
  1341. X  
  1342. X+ /* NCR towers define "tower".  Blecccch. */
  1343. X+ #ifdef tower
  1344. X+ #  undef tower
  1345. X+ #endif
  1346. X+ 
  1347. X  static const uchar tower[] = {
  1348. X      MOAT,      MOAT,     MOAT,     MOAT,    MOAT,      MOAT,     MOAT,
  1349. X      MOAT,      MOAT,     TLCORNER, HWALL,    TRCORNER, MOAT,     MOAT,
  1350. X***************
  1351. X*** 233,239 ****
  1352. X              return;
  1353. X          }
  1354. X          impossible("Cannot build the EndGame Level!");
  1355. X!         done("escaped");
  1356. X      }
  1357. X  # endif
  1358. X  #endif
  1359. X--- 238,244 ----
  1360. X              return;
  1361. X          }
  1362. X          impossible("Cannot build the EndGame Level!");
  1363. X!         done(ESCAPED);
  1364. X      }
  1365. X  # endif
  1366. X  #endif
  1367. X*** src/Old/mkobj.c    Wed Aug 16 12:28:46 1989
  1368. X--- src/mkobj.c    Tue Aug 15 18:48:04 1989
  1369. X***************
  1370. X*** 231,241 ****
  1371. X      case WEAPON_SYM:
  1372. X          otmp->quan = (otmp->otyp <= SHURIKEN) ? rn1(6,6) : 1;
  1373. X          if(!rn2(11)) {
  1374. X!             otmp->spe = rne(2);
  1375. X              otmp->blessed = rn2(2);
  1376. X          } else if(!rn2(10)) {
  1377. X              curse(otmp);
  1378. X!             otmp->spe = -rne(2);
  1379. X          } else    blessorcurse(otmp, 10);
  1380. X  
  1381. X  #ifdef NAMED_ITEMS
  1382. X--- 231,241 ----
  1383. X      case WEAPON_SYM:
  1384. X          otmp->quan = (otmp->otyp <= SHURIKEN) ? rn1(6,6) : 1;
  1385. X          if(!rn2(11)) {
  1386. X!             otmp->spe = rne(3);
  1387. X              otmp->blessed = rn2(2);
  1388. X          } else if(!rn2(10)) {
  1389. X              curse(otmp);
  1390. X!             otmp->spe = -rne(3);
  1391. X          } else    blessorcurse(otmp, 10);
  1392. X  
  1393. X  #ifdef NAMED_ITEMS
  1394. X***************
  1395. X*** 349,357 ****
  1396. X             otmp->otyp == GAUNTLETS_OF_FUMBLING ||
  1397. X             !rn2(11))) {
  1398. X              curse(otmp);
  1399. X!             otmp->spe = -rne(2);
  1400. X          } else if(!rn2(10)) {
  1401. X!             otmp->spe = rne(2);
  1402. X              otmp->blessed = rn2(2);
  1403. X          } else    blessorcurse(otmp, 10);
  1404. X          if(otmp->otyp == DRAGON_SCALE_MAIL)
  1405. X--- 349,357 ----
  1406. X             otmp->otyp == GAUNTLETS_OF_FUMBLING ||
  1407. X             !rn2(11))) {
  1408. X              curse(otmp);
  1409. X!             otmp->spe = -rne(3);
  1410. X          } else if(!rn2(10)) {
  1411. X!             otmp->spe = rne(3);
  1412. X              otmp->blessed = rn2(2);
  1413. X          } else    blessorcurse(otmp, 10);
  1414. X          if(otmp->otyp == DRAGON_SCALE_MAIL)
  1415. X*** src/Old/mkroom.c    Wed Aug 16 12:29:10 1989
  1416. X--- src/mkroom.c    Thu Aug 10 10:25:36 1989
  1417. X***************
  1418. X*** 88,94 ****
  1419. X                  return;
  1420. X              }
  1421. X  #ifdef THRONES
  1422. X!             if(*ep == 't' || *ep == 'T'){
  1423. X                  mkzoo(COURT);
  1424. X                  return;
  1425. X              }
  1426. X--- 88,94 ----
  1427. X                  return;
  1428. X              }
  1429. X  #ifdef THRONES
  1430. X!             if(*ep == 't' || *ep == 'T' || *ep == '\\'){
  1431. X                  mkzoo(COURT);
  1432. X                  return;
  1433. X              }
  1434. X***************
  1435. X*** 111,117 ****
  1436. X              }
  1437. X              for(i=0; shtypes[i].name; i++)
  1438. X                  if(*ep == shtypes[i].symb) goto gottype;
  1439. X!             i = -1;
  1440. X          }
  1441. X      }
  1442. X  gottype:
  1443. X--- 111,120 ----
  1444. X              }
  1445. X              for(i=0; shtypes[i].name; i++)
  1446. X                  if(*ep == shtypes[i].symb) goto gottype;
  1447. X!             if(*ep == 'g' || *ep == 'G')
  1448. X!                 i = 0;
  1449. X!             else
  1450. X!                 i = -1;
  1451. X          }
  1452. X      }
  1453. X  gottype:
  1454. X***************
  1455. X*** 320,325 ****
  1456. X--- 323,330 ----
  1457. X      if(!(sroom = pick_room())) return;
  1458. X  
  1459. X      if(!place_oracle(sroom,&dy,&xx,&yy)) return;
  1460. X+ 
  1461. X+     if(levl[xx][yy].mmask) rloc(m_at(xx, yy)); /* insurance */
  1462. X  
  1463. X      /* set up Oracle and environment */
  1464. X      if(!(oracl = makemon(&mons[PM_ORACLE],xx,yy))) return;
  1465. X*** src/Old/mon.c    Wed Aug 16 12:29:34 1989
  1466. X--- src/mon.c    Wed Aug 16 10:15:20 1989
  1467. X***************
  1468. X*** 10,15 ****
  1469. X--- 10,16 ----
  1470. X  
  1471. X  #ifdef HARD
  1472. X  static boolean restrap();
  1473. X+ #  include <ctype.h>
  1474. X  #endif
  1475. X  
  1476. X  long lastwarntime;
  1477. X***************
  1478. X*** 211,219 ****
  1479. X              /* continue if the monster died fighting */
  1480. X              fr = -1;
  1481. X  /* TODO:    Handle the case of the agressor dying? */
  1482. X!             if(Conflict && cansee(mtmp->mx,mtmp->my)
  1483. X!                 && !mtmp->iswiz
  1484. X!                 && (fr = fightm(mtmp)) == 2)
  1485. X                  continue;
  1486. X                if(fr<0 && dochugw(mtmp))
  1487. X                  continue;
  1488. X--- 212,226 ----
  1489. X              /* continue if the monster died fighting */
  1490. X              fr = -1;
  1491. X  /* TODO:    Handle the case of the agressor dying? */
  1492. X!             if(Conflict && !mtmp->iswiz &&
  1493. X!                /* area you can see if you're not blind */
  1494. X!                (dist(mtmp->mx,mtmp->my) < 3 ||
  1495. X!                 (levl[mtmp->mx][mtmp->my].lit &&
  1496. X!                  ((seelx <= mtmp->mx && mtmp->mx <= seehx &&
  1497. X!                    seely <= mtmp->my && mtmp->my <= seehy) ||
  1498. X!                   (seelx2 <= mtmp->mx && mtmp->mx <= seehx2 &&
  1499. X!                    seely2 <= mtmp->my && mtmp->my <= seehy2)))) &&
  1500. X!                (fr = fightm(mtmp)) == 2)
  1501. X                  continue;
  1502. X                if(fr<0 && dochugw(mtmp))
  1503. X                  continue;
  1504. X***************
  1505. X*** 635,643 ****
  1506. X          /* so have "poison arrow", "poison dart", etc... */
  1507. X          plural = (string[strlen(string) - 1] == 's')? 1 : 0;
  1508. X          if(Blind)
  1509. X!         pline("%s poisoned.", (plural) ? "They were" : "It was");
  1510. X          else
  1511. X!         pline("The %s %s poisoned!", string, (plural) ? "were" : "was");
  1512. X      }
  1513. X  
  1514. X      if(Poison_resistance) {
  1515. X--- 642,655 ----
  1516. X          /* so have "poison arrow", "poison dart", etc... */
  1517. X          plural = (string[strlen(string) - 1] == 's')? 1 : 0;
  1518. X          if(Blind)
  1519. X!         pline("%s poisoned.", plural ? "They were" : "It was");
  1520. X! #ifdef HARD
  1521. X!         /* avoid "The" Orcus's sting was poisoned... */
  1522. X!         else if(isupper(*string))
  1523. X!         pline("%s %s poisoned!", string, plural ? "were" : "was");
  1524. X! #endif
  1525. X          else
  1526. X!         pline("The %s %s poisoned!", string, plural ? "were" : "was");
  1527. X      }
  1528. X  
  1529. X      if(Poison_resistance) {
  1530. X***************
  1531. X*** 657,663 ****
  1532. X      }
  1533. X      if(u.uhp < 1) {
  1534. X          killer = pname;
  1535. X!         done("died");
  1536. X      }
  1537. X  }
  1538. X  
  1539. X--- 669,675 ----
  1540. X      }
  1541. X      if(u.uhp < 1) {
  1542. X          killer = pname;
  1543. X!         done(POISONING);
  1544. X      }
  1545. X  }
  1546. X  
  1547. X***************
  1548. X*** 831,837 ****
  1549. X  #ifdef DEBUG
  1550. X          pline("Automatically genocided %s.", makeplural(mons[tmp].mname));
  1551. X  #endif
  1552. X!         mons[tmp].geno |= G_GENOD;
  1553. X      }
  1554. X  #ifdef MAIL
  1555. X      /* If you kill the mail daemon, no more mail delivery.  -3. */
  1556. X--- 843,850 ----
  1557. X  #ifdef DEBUG
  1558. X          pline("Automatically genocided %s.", makeplural(mons[tmp].mname));
  1559. X  #endif
  1560. X!         if (tmp != PM_WIZARD_OF_YENDOR)
  1561. X!             mons[tmp].geno |= G_GENOD;
  1562. X      }
  1563. X  #ifdef MAIL
  1564. X      /* If you kill the mail daemon, no more mail delivery.  -3. */
  1565. X*** src/Old/mondata.c    Wed Aug 16 12:30:26 1989
  1566. X--- src/mondata.c    Tue Aug 15 22:58:29 1989
  1567. X***************
  1568. X*** 96,102 ****
  1569. X  canseemon(mtmp)
  1570. X      register struct monst *mtmp;
  1571. X  {
  1572. X!     return((!mtmp->minvis || See_invisible)
  1573. X          && (!mtmp->mhide ||
  1574. X              (levl[mtmp->mx][mtmp->my].omask == 0 &&
  1575. X               levl[mtmp->mx][mtmp->my].gmask == 0))
  1576. X--- 96,102 ----
  1577. X  canseemon(mtmp)
  1578. X      register struct monst *mtmp;
  1579. X  {
  1580. X!     return((!mtmp->minvis || See_invisible || Telepat)
  1581. X          && (!mtmp->mhide ||
  1582. X              (levl[mtmp->mx][mtmp->my].omask == 0 &&
  1583. X               levl[mtmp->mx][mtmp->my].gmask == 0))
  1584. X***************
  1585. X*** 121,135 ****
  1586. X      struct    permonst    *ptr;
  1587. X  {
  1588. X      register int    i;
  1589. X-     register struct permonst *mdat;
  1590. X  
  1591. X      if(ptr == &playermon) return(-1);
  1592. X  
  1593. X!     for(i = 0, mdat = &mons[0]; mdat->mlet; i++)
  1594. X!          if(ptr == mdat++) return(i);
  1595. X  
  1596. X!     panic("monsndx - could not index monster (%x)", ptr);
  1597. X!     return FALSE;               /* will not get here */
  1598. X  }
  1599. X  
  1600. X  int
  1601. X--- 121,137 ----
  1602. X      struct    permonst    *ptr;
  1603. X  {
  1604. X      register int    i;
  1605. X  
  1606. X      if(ptr == &playermon) return(-1);
  1607. X  
  1608. X!     i = (int)(ptr - &mons[0]);
  1609. X  
  1610. X!     if(i < 0 || i >= NUMMONS) {    
  1611. X!         panic("monsndx - could not index monster (%x)", ptr);
  1612. X!         return FALSE;        /* will not get here */
  1613. X!     }
  1614. X! 
  1615. X!     return(i);
  1616. X  }
  1617. X  
  1618. X  int
  1619. X***************
  1620. X*** 630,641 ****
  1621. X  cantweararm(ptr) struct permonst *ptr; {
  1622. X      return(breakarm(ptr) || sliparm(ptr));
  1623. X  }
  1624. X  
  1625. X  int
  1626. X  nolimbs(ptr) struct permonst *ptr; {
  1627. X      return((ptr->mflags2 & M2_NOLIMBS) != 0L);
  1628. X  }
  1629. X- # endif /* POLYSELF */
  1630. X  
  1631. X  int
  1632. X  carnivorous(ptr) struct permonst *ptr; {
  1633. X--- 632,643 ----
  1634. X  cantweararm(ptr) struct permonst *ptr; {
  1635. X      return(breakarm(ptr) || sliparm(ptr));
  1636. X  }
  1637. X+ # endif /* POLYSELF */
  1638. X  
  1639. X  int
  1640. X  nolimbs(ptr) struct permonst *ptr; {
  1641. X      return((ptr->mflags2 & M2_NOLIMBS) != 0L);
  1642. X  }
  1643. X  
  1644. X  int
  1645. X  carnivorous(ptr) struct permonst *ptr; {
  1646. X*** src/Old/monmove.c    Wed Aug 16 12:30:53 1989
  1647. X--- src/monmove.c    Tue Aug 15 18:49:05 1989
  1648. X***************
  1649. X*** 8,14 ****
  1650. X  #  include "artifact.h"
  1651. X  #endif
  1652. X  
  1653. X! static boolean /* TRUE : mtmp died */
  1654. X  mb_trapped(mtmp)
  1655. X  register struct monst *mtmp;
  1656. X  {
  1657. X--- 8,14 ----
  1658. X  #  include "artifact.h"
  1659. X  #endif
  1660. X  
  1661. X! boolean /* TRUE : mtmp died */
  1662. X  mb_trapped(mtmp)
  1663. X  register struct monst *mtmp;
  1664. X  {
  1665. X***************
  1666. X*** 684,689 ****
  1667. X--- 684,690 ----
  1668. X          u.uy = mtmp->my;
  1669. X              if(mtmp->mx != mtmp->mdx || mtmp->my != mtmp->mdy) {
  1670. X              swallowed(0);
  1671. X+             newsym(mtmp->mdx,mtmp->mdy);
  1672. X              mtmp->mdx = mtmp->mx;
  1673. X              mtmp->mdy = mtmp->my;
  1674. X          }
  1675. X*** src/Old/mthrowu.c    Mon Jul 31 21:56:30 1989
  1676. X--- src/mthrowu.c    Thu Aug 17 09:02:22 1989
  1677. X***************
  1678. X*** 133,139
  1679. X                  kludge("The poison doesn't seem to affect %s.",
  1680. X                                  mon_nam(mtmp));
  1681. X                  else {
  1682. X!                 if (rn2(10)) damage += rnd(6);
  1683. X                  else {
  1684. X                      pline("The poison was deadly...");
  1685. X                      damage = mtmp->mhp;
  1686. X
  1687. X--- 133,139 -----
  1688. X                  kludge("The poison doesn't seem to affect %s.",
  1689. X                                  mon_nam(mtmp));
  1690. X                  else {
  1691. X!                 if (rn2(30)) damage += rnd(6);
  1692. X                  else {
  1693. X                      pline("The poison was deadly...");
  1694. X                      damage = mtmp->mhp;
  1695. X*** src/Old/version.c    Wed Aug 16 12:49:33 1989
  1696. X--- src/version.c    Tue Aug 15 22:05:17 1989
  1697. X***************
  1698. X*** 4,9 ****
  1699. X--- 4,12 ----
  1700. X  
  1701. X  #include    "hack.h"
  1702. X  #include    "date.h"
  1703. X+ #ifndef BETA
  1704. X+ #include    "patchlevel.h"
  1705. X+ #endif
  1706. X  
  1707. X  int
  1708. X  doversion(){
  1709. X***************
  1710. X*** 11,17 ****
  1711. X  #ifdef BETA
  1712. X      pline("%s NetHack Beta Version %s - last build %s.",
  1713. X  #else
  1714. X!     pline("%s NetHack Version %s - last build %s.",
  1715. X  #endif
  1716. X  #if defined(MSDOS)
  1717. X  # if defined(TOS)
  1718. X--- 14,20 ----
  1719. X  #ifdef BETA
  1720. X      pline("%s NetHack Beta Version %s - last build %s.",
  1721. X  #else
  1722. X!     pline("%s NetHack Version %s Patchlevel %d - last build %s.",
  1723. X  #endif
  1724. X  #if defined(MSDOS)
  1725. X  # if defined(TOS)
  1726. X***************
  1727. X*** 20,26 ****
  1728. X--- 23,33 ----
  1729. X  #  if defined(AMIGA)
  1730. X          "Amiga",
  1731. X  #  else
  1732. X+ #   if defined(OS2)
  1733. X+         "OS/2",
  1734. X+ #   else
  1735. X          "PC",
  1736. X+ #   endif
  1737. X  #  endif
  1738. X  # endif
  1739. X  #endif
  1740. X***************
  1741. X*** 27,32 ****
  1742. X  #ifdef UNIX
  1743. X          "Unix",
  1744. X  #endif
  1745. X!         VERSION, datestring);
  1746. X      return 0;
  1747. X  }
  1748. X--- 34,43 ----
  1749. X  #ifdef UNIX
  1750. X          "Unix",
  1751. X  #endif
  1752. X!         VERSION,
  1753. X! #ifndef BETA
  1754. X!         PATCHLEVEL,
  1755. X! #endif
  1756. X!         datestring);
  1757. X      return 0;
  1758. X  }
  1759. X*** src/Old/weapon.c    Sun Jul 16 10:05:53 1989
  1760. X--- src/weapon.c    Fri Aug 18 08:13:41 1989
  1761. X***************
  1762. X*** 205,211 ****
  1763. X  
  1764. X          /* shooting gems from slings; this goes just before the darts */
  1765. X          if (rwep[i]==DART && !likes_gems(mtmp->data)
  1766. X!             /* && m_carrying(mtmp, SLING) */) {
  1767. X          for(otmp=mtmp->minvent; otmp; otmp=otmp->nobj) {
  1768. X              if(otmp->olet==GEM_SYM &&
  1769. X                  (otmp->otyp != LOADSTONE || !otmp->cursed))
  1770. X--- 205,211 ----
  1771. X  
  1772. X          /* shooting gems from slings; this goes just before the darts */
  1773. X          if (rwep[i]==DART && !likes_gems(mtmp->data)
  1774. X!             && m_carrying(mtmp, SLING)) {
  1775. X          for(otmp=mtmp->minvent; otmp; otmp=otmp->nobj) {
  1776. X              if(otmp->olet==GEM_SYM &&
  1777. X                  (otmp->otyp != LOADSTONE || !otmp->cursed))
  1778. X***************
  1779. X*** 224,237 ****
  1780. X            no_propellor = !(m_carrying(mtmp, BOW));
  1781. X  #endif
  1782. X            break;
  1783. X!         /* case WP_SLING:
  1784. X            no_propellor = (m_carrying(mtmp, SLING) != 0);
  1785. X!           break; */
  1786. X          case WP_CROSSBOW:
  1787. X            no_propellor = (m_carrying(mtmp, CROSSBOW) != 0);
  1788. X          }
  1789. X            }
  1790. X!         if (!no_propellor) Oselect(rwep[i]);
  1791. X        }
  1792. X  
  1793. X      /* failure */
  1794. X--- 224,248 ----
  1795. X            no_propellor = !(m_carrying(mtmp, BOW));
  1796. X  #endif
  1797. X            break;
  1798. X!         case WP_SLING:
  1799. X            no_propellor = (m_carrying(mtmp, SLING) != 0);
  1800. X!           break;
  1801. X          case WP_CROSSBOW:
  1802. X            no_propellor = (m_carrying(mtmp, CROSSBOW) != 0);
  1803. X          }
  1804. X            }
  1805. X!         if (!no_propellor) {
  1806. X!         /* Note: cannot use m_carrying for loadstones, since it will
  1807. X!          * always select the first object of a type, and maybe the
  1808. X!          * monster is carrying two but only the first is unthrowable.
  1809. X!          */
  1810. X!         if (rwep[i] != LOADSTONE) {
  1811. X!             Oselect(rwep[i]);
  1812. X!         } else for(otmp=mtmp->minvent; otmp; otmp=otmp->nobj) {
  1813. X!             if (otmp->otyp == LOADSTONE && !otmp->cursed)
  1814. X!             return otmp;
  1815. X!         }
  1816. X!         }
  1817. X        }
  1818. X  
  1819. X      /* failure */
  1820. X***************
  1821. X*** 327,333 ****
  1822. X      else if(ACURR(A_DEX) < 6) return(sbon-2);
  1823. X      else if(ACURR(A_DEX) < 8) return(sbon-1);
  1824. X      else if(ACURR(A_DEX) < 14) return(sbon);
  1825. X!     else return(sbon+ACURR(A_DEX)-15);
  1826. X  }
  1827. X  
  1828. X  int
  1829. X--- 338,344 ----
  1830. X      else if(ACURR(A_DEX) < 6) return(sbon-2);
  1831. X      else if(ACURR(A_DEX) < 8) return(sbon-1);
  1832. X      else if(ACURR(A_DEX) < 14) return(sbon);
  1833. X!     else return(sbon+ACURR(A_DEX)-14);
  1834. X  }
  1835. X  
  1836. X  int
  1837. X*** src/Old/were.c    Wed Aug 16 12:49:59 1989
  1838. X--- src/were.c    Fri Aug  4 12:37:40 1989
  1839. X***************
  1840. X*** 47,53 ****
  1841. X      }
  1842. X  
  1843. X      if(canseemon(mon))
  1844. X!         pline("%s changes into a %s.", Monnam(mon), mons[pm].mname);
  1845. X  
  1846. X      mon->data = &mons[pm];
  1847. X      /* regenerate by 1/4 of the lost hit points */
  1848. X--- 47,54 ----
  1849. X      }
  1850. X  
  1851. X      if(canseemon(mon))
  1852. X!         pline("%s changes into a %s.", Monnam(mon),
  1853. X!             Hallucination ? rndmonnam() : mons[pm].mname);
  1854. X  
  1855. X      mon->data = &mons[pm];
  1856. X      /* regenerate by 1/4 of the lost hit points */
  1857. X*** src/Old/wield.c    Wed Aug 16 12:50:15 1989
  1858. X--- src/wield.c    Tue Aug 15 20:35:31 1989
  1859. X***************
  1860. X*** 66,72 ****
  1861. X              makeplural(body_part(HAND)));
  1862. X          You("turn to stone...");
  1863. X          killer="cockatrice corpse";
  1864. X!         done("stoned");
  1865. X      } else if(uarms && bimanual(wep))
  1866. X          You("cannot wield a two-handed %s and hold a shield.",
  1867. X           is_sword(wep) ? "sword" : "weapon");
  1868. X--- 66,72 ----
  1869. X              makeplural(body_part(HAND)));
  1870. X          You("turn to stone...");
  1871. X          killer="cockatrice corpse";
  1872. X!         done(STONING);
  1873. X      } else if(uarms && bimanual(wep))
  1874. X          You("cannot wield a two-handed %s and hold a shield.",
  1875. X           is_sword(wep) ? "sword" : "weapon");
  1876. X*** src/Old/worn.c    Wed Aug 16 12:50:55 1989
  1877. X--- src/worn.c    Tue Aug 15 20:35:33 1989
  1878. X***************
  1879. X*** 68,74 ****
  1880. X      if (Inhell && !Fire_resistance) {
  1881. X          pline(crispy);
  1882. X          killer = "loss of fire protection";
  1883. X!         done("burned");
  1884. X          /* If we're here they survived with life saving, so put the
  1885. X           * weapon they just unwielded back in their hands...
  1886. X           */
  1887. X--- 68,74 ----
  1888. X      if (Inhell && !Fire_resistance) {
  1889. X          pline(crispy);
  1890. X          killer = "loss of fire protection";
  1891. X!         done(BURNING);
  1892. X          /* If we're here they survived with life saving, so put the
  1893. X           * weapon they just unwielded back in their hands...
  1894. X           */
  1895. X***************
  1896. X*** 108,114 ****
  1897. X      if (Inhell && !Fire_resistance && obj->olet != AMULET_SYM) {
  1898. X          pline(crispy);
  1899. X          killer = "loss of fire protection";
  1900. X!         done("burned");
  1901. X          /* Survived with lifesaving, etc...; there's no general way
  1902. X           * to undo the setnotworn()--we can't re-wear/wield the
  1903. X           * item since it might have been stolen, disintegrated, etc....
  1904. X--- 108,114 ----
  1905. X      if (Inhell && !Fire_resistance && obj->olet != AMULET_SYM) {
  1906. X          pline(crispy);
  1907. X          killer = "loss of fire protection";
  1908. X!         done(BURNING);
  1909. X          /* Survived with lifesaving, etc...; there's no general way
  1910. X           * to undo the setnotworn()--we can't re-wear/wield the
  1911. X           * item since it might have been stolen, disintegrated, etc....
  1912. X***************
  1913. X*** 121,127 ****
  1914. X               */
  1915. X  #endif
  1916. X              You("are still burning and die again...");
  1917. X!             done("burned");
  1918. X  #if defined(WIZARD) || defined(EXPLORE_MODE)
  1919. X          }
  1920. X  #endif
  1921. X--- 121,127 ----
  1922. X               */
  1923. X  #endif
  1924. X              You("are still burning and die again...");
  1925. X!             done(BURNING);
  1926. X  #if defined(WIZARD) || defined(EXPLORE_MODE)
  1927. X          }
  1928. X  #endif
  1929. X*** src/Old/zap.c    Wed Aug 16 13:54:17 1989
  1930. X--- src/zap.c    Wed Aug 16 13:40:28 1989
  1931. X***************
  1932. X*** 43,48 ****
  1933. X--- 43,55 ----
  1934. X      ""
  1935. X  };
  1936. X  
  1937. X+ #ifdef TEXTCOLOR
  1938. X+ static const int zapcolor[10] = {
  1939. X+     AT_ZAP, RED, AT_ZAP, WHITE, AT_ZAP, WHITE,
  1940. X+     AT_ZAP, AT_ZAP, AT_ZAP, AT_ZAP
  1941. X+ };
  1942. X+ #endif
  1943. X+ 
  1944. X  /* Routines for IMMEDIATE wands and spells. */
  1945. X  /* bhitm: monster mtmp was hit by the effect of wand or spell otmp */
  1946. X  static int
  1947. X***************
  1948. X*** 657,663 ****
  1949. X              You("die.");
  1950. X              makeknown(WAN_DEATH);
  1951. X              /* They might survive with an amulet of life saving */
  1952. X!             done("died");
  1953. X              break;
  1954. X  #ifdef SPELLS
  1955. X          case SPE_TURN_UNDEAD:
  1956. X--- 664,670 ----
  1957. X              You("die.");
  1958. X              makeknown(WAN_DEATH);
  1959. X              /* They might survive with an amulet of life saving */
  1960. X!             done(DIED);
  1961. X              break;
  1962. X  #ifdef SPELLS
  1963. X          case SPE_TURN_UNDEAD:
  1964. X***************
  1965. X*** 705,743 ****
  1966. X      if(objects[obj->otyp].bits & IMMEDIATE) {
  1967. X          if(u.uswallow)    (void)bhitm(u.ustuck, obj);
  1968. X          else if(u.dz) {
  1969. X!         if(u.dz > 0 && levl[u.ux][u.uy].omask) {
  1970. X!             register struct obj *otmp,*otmp2;
  1971. X! 
  1972. X!             /* changed by GAN to hit all objects there */
  1973. X!             for(otmp = fobj; otmp ; otmp = otmp2) {
  1974. X!             otmp2 = otmp->nobj;
  1975. X!             /* save pointer as bhito may destroy otmp */
  1976. X!             if(otmp->ox == u.ux && otmp->oy == u.uy)
  1977. X!                 (void) bhito(otmp, obj);
  1978. X!             }
  1979. X!         }
  1980. X!         } else if((obj->otyp == WAN_OPENING) ||
  1981. X! #ifdef SPELLS
  1982. X!               (obj->otyp == SPE_KNOCK) ||
  1983. X!               (obj->otyp == SPE_WIZARD_LOCK) ||
  1984. X! #endif
  1985. X!               (obj->otyp == WAN_LOCKING)) {
  1986. X!             (void)bhit(u.dx,u.dy,rn1(8,6),0,bhitm,bhito,obj);
  1987. X  #ifdef STRONGHOLD
  1988. X!         } else if(obj->otyp == WAN_STRIKING
  1989. X! #ifdef SPELLS
  1990. X!               || obj->otyp == SPE_FORCE_BOLT
  1991. X! #endif /* SPELLS /**/
  1992. X!               ) {
  1993. X!             int x,y;
  1994. X!             x = u.ux + u.dx;
  1995. X!             y = u.uy + u.dy;
  1996. X!             if (find_drawbridge(&x,&y))
  1997. X!             destroy_drawbridge(x,y);
  1998. X! 
  1999. X!             else (void) bhit(u.dx,u.dy,rn1(8,6),0,bhitm,bhito,obj);
  2000. X! #endif /* STRONGHOLD /**/
  2001. X!         } else  (void) bhit(u.dx,u.dy,rn1(8,6),0,bhitm,bhito,obj);
  2002. X      } else {
  2003. X          switch(obj->otyp){
  2004. X          case WAN_LIGHT:
  2005. X--- 712,741 ----
  2006. X      if(objects[obj->otyp].bits & IMMEDIATE) {
  2007. X          if(u.uswallow)    (void)bhitm(u.ustuck, obj);
  2008. X          else if(u.dz) {
  2009. X!         if(u.dz > 0) {
  2010. X  #ifdef STRONGHOLD
  2011. X!             if(levl[u.ux][u.uy].typ == DRAWBRIDGE_DOWN &&
  2012. X!                (obj->otyp == WAN_LOCKING
  2013. X! # ifdef SPELLS
  2014. X!             || obj->otyp == SPE_WIZARD_LOCK
  2015. X! # endif
  2016. X!             ))
  2017. X!                 (void)close_drawbridge(u.ux, u.uy);
  2018. X!             else
  2019. X! #endif
  2020. X!             if (levl[u.ux][u.uy].omask) {
  2021. X!             register struct obj *otmp,*otmp2;
  2022. X! 
  2023. X!             /* changed by GAN to hit all objects there */
  2024. X!             for(otmp = fobj; otmp ; otmp = otmp2) {
  2025. X!                 otmp2 = otmp->nobj;
  2026. X!                 /* save pointer as bhito may destroy otmp */
  2027. X!                 if(otmp->ox == u.ux && otmp->oy == u.uy)
  2028. X!                         (void) bhito(otmp, obj);
  2029. X!             }
  2030. X!             }
  2031. X!         }
  2032. X!         } else (void) bhit(u.dx,u.dy,rn1(8,6),0,bhitm,bhito,obj);
  2033. X      } else {
  2034. X          switch(obj->otyp){
  2035. X          case WAN_LIGHT:
  2036. X***************
  2037. X*** 935,940 ****
  2038. X--- 933,940 ----
  2039. X      register struct monst *mtmp;
  2040. X      register struct obj *otmp;
  2041. X      register int typ;
  2042. X+     boolean shopdoor = FALSE;
  2043. X+     xchar dlx, dly;
  2044. X  
  2045. X      bhitpos.x = u.ux;
  2046. X      bhitpos.y = u.uy;
  2047. X***************
  2048. X*** 944,966 ****
  2049. X          tmp_at(-3, (int)AT_OBJ);
  2050. X      }
  2051. X      while(range-- > 0) {
  2052. X          bhitpos.x += ddx;
  2053. X          bhitpos.y += ddy;
  2054. X-         typ = levl[bhitpos.x][bhitpos.y].typ;
  2055. X  #ifdef STRONGHOLD
  2056. X!         if(IS_DRAWBRIDGE(typ))
  2057. X              switch (obj->otyp) {
  2058. X              case WAN_OPENING:
  2059. X  # ifdef SPELLS
  2060. X              case SPE_KNOCK:
  2061. X  # endif
  2062. X!                 (void) open_drawbridge(bhitpos.x,bhitpos.y);
  2063. X                  break;
  2064. X              case WAN_LOCKING:
  2065. X  # ifdef SPELLS
  2066. X              case SPE_WIZARD_LOCK:
  2067. X  # endif
  2068. X!                 (void) close_drawbridge(bhitpos.x,bhitpos.y);
  2069. X              }
  2070. X  #endif /* STRONGHOLD /**/
  2071. X          if(levl[bhitpos.x][bhitpos.y].mmask){
  2072. X--- 944,975 ----
  2073. X          tmp_at(-3, (int)AT_OBJ);
  2074. X      }
  2075. X      while(range-- > 0) {
  2076. X+ #ifdef STRONGHOLD
  2077. X+         int x,y;
  2078. X+ #endif
  2079. X          bhitpos.x += ddx;
  2080. X          bhitpos.y += ddy;
  2081. X  #ifdef STRONGHOLD
  2082. X!         x = bhitpos.x; y = bhitpos.y;
  2083. X!         if (find_drawbridge(&x,&y))
  2084. X              switch (obj->otyp) {
  2085. X              case WAN_OPENING:
  2086. X  # ifdef SPELLS
  2087. X              case SPE_KNOCK:
  2088. X  # endif
  2089. X!                 (void) open_drawbridge(x,y);
  2090. X                  break;
  2091. X              case WAN_LOCKING:
  2092. X  # ifdef SPELLS
  2093. X              case SPE_WIZARD_LOCK:
  2094. X  # endif
  2095. X!                 (void) close_drawbridge(x,y);
  2096. X!                 break;
  2097. X!             case WAN_STRIKING:
  2098. X! # ifdef SPELLS
  2099. X!             case SPE_FORCE_BOLT:
  2100. X! # endif
  2101. X!                 destroy_drawbridge(x,y);
  2102. X              }
  2103. X  #endif /* STRONGHOLD /**/
  2104. X          if(levl[bhitpos.x][bhitpos.y].mmask){
  2105. X***************
  2106. X*** 987,1002 ****
  2107. X              }
  2108. X              if(hitanything)    range--;
  2109. X          }
  2110. X          if(IS_DOOR(typ) || typ == SDOOR) {
  2111. X              switch (obj->otyp) {
  2112. X              case WAN_OPENING:
  2113. X              case WAN_LOCKING:
  2114. X  #ifdef SPELLS
  2115. X              case SPE_KNOCK:
  2116. X              case SPE_WIZARD_LOCK:
  2117. X  #endif
  2118. X!                 if (doorlock(obj,bhitpos.x,bhitpos.y))
  2119. X!                     makeknown(obj->otyp);
  2120. X                  break;
  2121. X              }
  2122. X          }
  2123. X--- 996,1020 ----
  2124. X              }
  2125. X              if(hitanything)    range--;
  2126. X          }
  2127. X+         typ = levl[bhitpos.x][bhitpos.y].typ;
  2128. X          if(IS_DOOR(typ) || typ == SDOOR) {
  2129. X              switch (obj->otyp) {
  2130. X              case WAN_OPENING:
  2131. X              case WAN_LOCKING:
  2132. X+             case WAN_STRIKING:
  2133. X  #ifdef SPELLS
  2134. X              case SPE_KNOCK:
  2135. X              case SPE_WIZARD_LOCK:
  2136. X+             case SPE_FORCE_BOLT:
  2137. X  #endif
  2138. X!                 if (doorlock(obj, bhitpos.x, bhitpos.y)) {
  2139. X!                 makeknown(obj->otyp);
  2140. X!                 if (levl[bhitpos.x][bhitpos.y].doormask == D_BROKEN
  2141. X!                     && in_shop(bhitpos.x, bhitpos.y)) {
  2142. X!                     shopdoor = TRUE;
  2143. X!                     dlx = bhitpos.x; dly = bhitpos.y;
  2144. X!                 }
  2145. X!                 }
  2146. X                  break;
  2147. X              }
  2148. X          }
  2149. X***************
  2150. X*** 1017,1022 ****
  2151. X--- 1035,1044 ----
  2152. X      /* leave last symbol unless in a pool */
  2153. X      if(sym)
  2154. X         tmp_at(-1, is_pool(bhitpos.x,bhitpos.y) ? -1 : 0);
  2155. X+ 
  2156. X+     if(shopdoor && !in_shop(u.ux, u.uy))
  2157. X+         pay_for_door(dlx, dly, "destroy");
  2158. X+ 
  2159. X      return (struct monst *)0;
  2160. X  }
  2161. X  
  2162. X***************
  2163. X*** 1032,1038 ****
  2164. X--- 1054,1064 ----
  2165. X  
  2166. X      for(i=0; i<8; i++) if(xdir[i] == dx && ydir[i] == dy) break;
  2167. X      tmp_at(-1, sym);    /* open call */
  2168. X+ #ifndef TEXTCOLOR
  2169. X      tmp_at(-3, (int)AT_OBJ);
  2170. X+ #else
  2171. X+     tmp_at(-3, HI_METAL);
  2172. X+ #endif
  2173. X      for(ct=0; ct<10; ct++) {
  2174. X          if(i == 8) i = 0;
  2175. X          sym = ')' + '(' - sym;
  2176. X***************
  2177. X*** 1225,1234 ****
  2178. X      if(type < 0) pru();
  2179. X      range = rn1(7,7);
  2180. X      Tmp_at2(-1, (int) dirlet(dx,dy));    /* open call */
  2181. X! #ifdef MSDOSCOLOR
  2182. X!     Tmp_at2(-3, (int)(abstype == 1 ? AT_RED :    /* fire */
  2183. X!               abstype == 3 || abstype == 5 ? AT_WHITE :    /* cold/elec */
  2184. X!               AT_ZAP));
  2185. X  #endif
  2186. X      while(range-- > 0) {
  2187. X          sx += dx;
  2188. X--- 1251,1258 ----
  2189. X      if(type < 0) pru();
  2190. X      range = rn1(7,7);
  2191. X      Tmp_at2(-1, (int) dirlet(dx,dy));    /* open call */
  2192. X! #ifdef TEXTCOLOR
  2193. X!     Tmp_at2(-3, zapcolor[abstype]);
  2194. X  #endif
  2195. X      while(range-- > 0) {
  2196. X          sx += dx;
  2197. END_OF_FILE
  2198. if test 54587 -ne `wc -c <'patch02e'`; then
  2199.     echo shar: \"'patch02e'\" unpacked with wrong size!
  2200. fi
  2201. # end of 'patch02e'
  2202. fi
  2203. echo shar: End of archive 5 \(of 7\).
  2204. cp /dev/null ark5isdone
  2205. MISSING=""
  2206. for I in 1 2 3 4 5 6 7 ; do
  2207.     if test ! -f ark${I}isdone ; then
  2208.     MISSING="${MISSING} ${I}"
  2209.     fi
  2210. done
  2211. if test "${MISSING}" = "" ; then
  2212.     echo You have unpacked all 7 archives.
  2213.     rm -f ark[1-9]isdone
  2214. else
  2215.     echo You still need to unpack the following archives:
  2216.     echo "        " ${MISSING}
  2217. fi
  2218. ##  End of shell archive.
  2219. exit 0
  2220.